<?php  				
// 错误信息
	echo validation_errors();		
?>
<form id="pagerForm" method="post" action="<?=$this->uri->uri_string()?>">
	<input type="hidden" name="pageNum" value="1" />
	<input type="hidden" name="numPerPage" value="${model.numPerPage}" />
	<input type="hidden" name="orderField" value="${param.orderField}" />
	<input type="hidden" name="orderDirection" value="${param.orderDirection}" />
</form>

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="w_removeSelected.html" method="post">
	<div class="searchBar">
		<ul class="searchContent">
			<li>
				<label>搜索用户：</label>
				<input type="text" name="keywords" value=""/>
			</li>
			<li>
			<select class="combox" name="province">
				<option value="">用户组</option>
				<option value="注册用户">注册用户</option>
				<option value="VIP用户">VIP用户</option>
				<option value="管理员">管理员</option>
			</select>
			</li>
		</ul>
		
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
			</ul>
		</div>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="<?=site_url('manage/user/roles/add')?>" target="dialog" rel="dlg_page" width="645" height="200" fresh="true"><span>添加</span></a></li>
			<li><a title="确实要删除这些记录吗?" target="selectedTodo" rel="ids" postType="string" href="<?=site_url('manage/user/roles/delete')?>" class="delete"><span>删除</span></a></li>
		</ul>
	</div>
	<table class="table" width="1200" layoutH="138">
		<thead>
			<tr>
				<th width="22"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
				<th width="200" orderField="accountNo" class="asc">ID</th>
				<th width="200" orderField="accountName">用户组</th>
				<th width="80" orderField="accountType">上级 ID</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<?php foreach ($roles as $role) :?>
			<tr target="sid_user" rel="<?=$role->id?>">
				<td><input name="ids" value="<?=$role->id?>" type="checkbox"></td>
				<td><?=$role->id?></td>
				<td><?=$role->name?></td>
				<td><?=$role->parent_id?></td>
				<td>
					<a title="编辑自定义权限" target="dialog" href="<?=site_url('manage/user/custom_permissions/'.$role->id)?>" class="btnEdit">编辑权限</a>
					<a title="编辑URL权限" target="dialog" href="<?=site_url('manage/user/uri_permissions/'.$role->id)?>" class="btnEdit">编辑权限</a>
				</td>
			</tr>
			<?php endforeach;?>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="20">20</option>
				<option value="50">50</option>
				<option value="100">100</option>
				<option value="200">200</option>
			</select>
			<span>条，共${totalCount}条</span>
		</div>
		
		<div class="pagination" targetType="navTab" totalCount="200" numPerPage="20" pageNumShown="10" currentPage="1"></div>

	</div>
</div>
